﻿
namespace VMWareLabWorkflowsDataContracts.VMWareLabDetailsDialogControls.DataContracts
{
    using System.Collections.Generic;
    using System.ComponentModel;

    public class VirtualMachineSetting : INotifyPropertyChanged
    {
        private string selectedSnapshotName;

        /// <summary>
        /// Gets or sets the name of the virtual machine.
        /// </summary>
        /// <value>The name of the virtual machine.</value>
        public string VirtualMachineName { get; set; }

        /// <summary>
        /// Gets or sets the snapshot names.
        /// </summary>
        /// <value>The snapshot names.</value>
        public List<string> SnapshotNames { get; set; }

        /// <summary>
        /// Gets or sets the name of the selected snapshot.
        /// </summary>
        /// <value>The name of the selected snapshot.</value>
        public string SelectedSnapshotName
        {
            get
            {
                return this.selectedSnapshotName;
            }
            set
            {
                this.selectedSnapshotName = value;
                this.OnPropertyChanged("SelectedSnapshotName");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = this.PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(name));
            }
        }
    }
}
